<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>MVVM</title>
    <script src="./src/watcher.js"></script>
    <script src="./src/dep.js"></script>
    <script src="./src/observe.js"></script>
    <script src="./src/compile.js"></script>
    <script src="./src/mvvm.js"></script>
</head>

<body>
    <div id="app">
        <div v-html="message"></div>
        <button v-on:click="clickHandler">{{message2}}</button>
    </div>
    <script>
        let vm = new MVVM({
            el: "#app",
            data: {
                message: "<span>v-html</span>",
                message2: "v-on"
            },
            methods: {
                clickHandler() {
                    vm.$data.message2 = "changed";
                    vm.$data.message = "hello world";
                }
            }
        });
    </script>
</body>

</html>